[#ftl]

[#macro css]
<link href="${base}/sresources/frame/jquery/bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet">
<link href="${base}/static/root/css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="${base}/sresources/frame/FontAwesomemaster/css/font-awesome.min.css" rel="stylesheet">
<link rel="shortcut icon" href="${base}/Favicon.ico"> 
[/#macro]
[#macro js]
<script src="${base}/static/frame/jquery/core/jquery-1.12.3.min.js"></script>
[/#macro]

[#macro header]
		
		<div class="header">
			<div class="header-left">
				<div class="head-nav">
						<span class="menu"> </span>
					<ul class="cl-effect-1">
						<li  [#if jweb.pathInfo().viewPath=="/index"]class="active"[/#if]><a href="${base}/index.htm">首页</a></li>
						[@jdao.hql("from PageMenus where parent is null order by sortInfo")]
						[#local mid=(jweb.pathName(item.pageMenuType.name()?lower_case)[0])!"0"]
						<li [#if mid==(item.id?string)] class="active" [/#if] ><a href="${base}/${item.pageMenuType.name()?lower_case}_${item.id}-${item.id}/list_1.htm" >${item.name}</a>
							[#assign cmenus=jdao.hql("from PageMenus where parent=?",[item])()]
							[#if cmenus?size>0]
							<div class="dropdown">
							  <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1" style="background:rgba(31,218,228,0.5);">
							  	[#list cmenus as itm]
							    	<li role="presentation" ><a role="menuitem" tabindex="-1" href="${base}/${itm.pageMenuType.name()?lower_case}_${item.id}-${itm.id}/list_1.htm">${itm.name}</a></li>
							    [/#list]
							  </ul>
							</div>
							[/#if]
						</li>
						[/@]
						<li [#if jweb.pathInfo().viewPath=="/contact"]class="active"[/#if]><a href="/contact.htm">关于我们</a></li>
							<div class="clearfix"></div>
					</ul>
					<script type="text/javascript">
						$(function(){
							$(".cl-effect-1>li").hover(function() {
								$(this).find(".dropdown-menu").show();
							}, function() {
								$(this).find(".dropdown-menu").hide();
							});
						});
					</script>
				</div>
				<div class="search2">
					<form>
						<input type="text" placeholder="站内搜索" autocomplete="off">
						<input type="submit" value="">
					</form>
				</div>
					<div class="clearfix"> </div>
			</div>
				<div class="clearfix"> </div>
		</div>
[/#macro]

[#macro footer]
	<div class="footer">
			<div class="container">
			<div class="footer-top">
				<div class="foot-left">
					<h5><a href="${base}/index.htm">Hector.Tong</a></h5>
					
				</div>
				<div class="foot-right">
					<ul>
						<li><a href="#"><i class="fb"></i></a></li>
						<li><a href="#"><i class="twt"></i></a></li>
						<li><a href="#"><i class="in"></i></a></li>
						<li><a href="#"><i class="rss"></i></a></li>
						<div class="clearfix"> </div>
					</ul>
				</div>
				<div class="clearfix"> </div>
			</div>
			<i class="line"> </i>
			<div class="footer-bottom">
				<div class="foot-left">
					<div class="foot-nav">
					<ul>
						<li><a href="index.html">首页</a></li> |
						<li><a href="about.html">淘宝网店</a></li> |
						<li><a href="services.html">技术支持</a></li> |
						<li><a href="products.html">关于我们</a></li> |
						<li><a href="blog.html">网站地图</a></li> |
							<div class="clearfix"></div>
					</ul>
					</div>					
				</div>
				<div class="foot-right">
					<p>Copyright &copy; 2016 Hector.Tong.<a target="_blank" href="http://www.51findjob.com">我们的网站</a> </p>
				</div>
				<div class="clearfix"> </div>
			</div>
		</div>
	</div>
[/#macro]

[#function clearPath path]
	[#local res=""]
	[#list path as item]
	[#if item_index!=path?size-1]
		[#local res=res+item[0]]
	[/#if]
	[/#list]
	[#return res+"/"+path.viewName]
[/#function]

[#macro pageBar name="item_list"]
[#local pages=.vars[name]]
[#local total=(pages.total/pages.getSize())?ceiling] 
[#if pages?exists&&pages.total?exists&&total>1]
<nav>
  <ul class="pagination">
			[#if pages.page>1]
					<li> <a href="${clearPath(jweb.pathInfo())}_1.htm" class="page_first"><i class="fa fa-fast-backward"></i></a></li>
					<li> <a href="${clearPath(jweb.pathInfo())+"_"+(pages.page-1)}.htm" class="page_first"><i class="fa fa-backward"></i></a></li>
			[#else]
					<li class="disabled"><a href="javaScript:void(0)" class="page_first"><i class="fa fa-fast-backward"></i></a></li>
					<li class="disabled"><a href="javaScript:void(0)" class="page_first"><i class="fa fa-backward"></i></a></li>
			[/#if]
			
			[#if total>11]
					[#if pages.page>7]
						<li><a href="${clearPath(jweb.pathInfo())+"_"+1}.htm">1</a></li>
							<li><span class="more">…</span></li>
							[#if total-pages.page<6]
								[#list total-6..pages.page-1 as number]
									<li ><a href="${clearPath(jweb.pathInfo())+"_"+number}.htm">${number}</a></li>
								[/#list]
							[#else]
								<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page-5)}.htm">${pages.page-5}</a></li>
								<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page-4)}.htm">${pages.page-4}</a></li>
								<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page-3)}.htm">${pages.page-3}</a></li>
								<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page-2)}.htm">${pages.page-2}</a></li>
								<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page-1)}.htm">${pages.page-1}</a></li>
							[/#if]
						[#else]
							[#if pages.page>1]
								[#list 1..pages.page-1 as number]
									<li><a href="${clearPath(jweb.pathInfo())+"_"+number}.htm">${number}</a></li>
								[/#list]
							[/#if]
						[/#if]
					<li  class="active"><a  href="javaScript:void(0)">${pages.page}</a></li>		
						[#if total-pages.page > 6]
							[#if pages.page<6]
									[#list pages.page+1..6 as number]
										<li><a href="${clearPath(jweb.pathInfo())+"_"+number}.htm">${number}</a></li>
									[/#list]
								[#else]
									<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page+1)}.htm">${pages.page+1}</a></li>
									<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page+2)}.htm">${pages.page+2}</a></li>
									<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page+2)}.htm">${pages.page+3}</a></li>
									<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page+2)}.htm">${pages.page+4}</a></li>
									<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page+2)}.htm">${pages.page+5}</a></li>
							[/#if]
							<li><span class="more">…</span></li>
							<li><a href="${clearPath(jweb.pathInfo())+"_"+total}.htm">${total}</a></li>
						[#else]
							[#if pages.page < total]
								[#list pages.page+1..total as number]
									<li><a href="${clearPath(jweb.pathInfo())+"_"+number}.htm">${number}</a></li>
								[/#list]
							[/#if]
						[/#if]
					
				[#else]
					[#list 1..total as pageNumber]
						[#if pages.page == pageNumber]
								<li class="active"><span href="javaScript:void(0)">${pageNumber}</span></li>
							[#else]
								<li><a href="${clearPath(jweb.pathInfo())+"_"+pageNumber}.htm">${pageNumber}</a></li>
						[/#if]
					[/#list]
			[/#if]
			[#if pages.page lt total]
					
					<li><a href="${clearPath(jweb.pathInfo())+"_"+(pages.page+1)}.htm" class="last"><i class="fa fa-forward"></i><b></b></a></li>
					<li><a href="${clearPath(jweb.pathInfo())+"_"+total}.htm" class="last"><i class="fa fa-fast-forward"></i><b></b></a></li>
				[#else]
					
					<li><a href="javaScript:void(0)" class="last"><i class="fa fa-forward"></i><b></b></a></li>
					<li><a href="javaScript:void(0)" class="last"><i class="fa fa-fast-forward"></i><b></b></a></li>
			[/#if]
		</ul>
</nav>
[/#if]
[/#macro]

[#macro cms_nav]
<h3 style="margin-bottom:20px;"><a href="${base}/cms_${(menu.parent.id)!menu.id}-${(menu.parent.id)!menu.id}/list_1.htm"> ${(menu.parent.name)!menu.name}</a>&gt;&gt;<a href="${base}/cms_${(menu.parent.id)!menu.id}-${menu.id}/list_1.htm"> ${menu.name}</a></h3>
[/#macro]
